//
//  NSError+ErrorCode.m
//  SQBaseKit
//
//  Created by Seven on 23/03/2018.
//  Copyright © 2018 Seven. All rights reserved.
//

#import "NSError+ErrorCode.h"
#import "NSObject+category.h"
#import <objc/runtime.h>

@implementation NSError (ErrorCode)

- (NSString *)errorCode
{
    return [self objc_getAssociatedObject:@"ErrorCode"];
}

- (void)setErrorCode:(NSString *)errorCode
{
    [self objc_setAssociatedObject:@"ErrorCode" value:errorCode policy:OBJC_ASSOCIATION_COPY_NONATOMIC];
}

@end
